﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using PracticeChart.DataTypes;

namespace PracticeChart.Popups
{
    public partial class Patient : Form
    {
        // main chart attribute
        private Main main;
        public Main MainWindow { get { return main; } }
        public Patient()
        {
            InitializeComponent();
        }
        public Patient(Main c)
        {
            InitializeComponent();
            main = c;
        }

        private void noPatientButton_Click(object sender, EventArgs e)
        {
            main.AddPatient(null);
            this.Close();
        }

        private void searchPatientButton_Click(object sender, EventArgs e)
        {
            SearchPatients searchPt = new SearchPatients(this);
            searchPt.Activate();
            searchPt.Show();
        }
        private void AddPatient(PatientData pt)
        {
            main.AddPatient(pt);
            this.Close();
        }
    }
}
